package com.cn.lf.wx;


import java.beans.Introspector;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;
import org.springframework.util.ClassUtils;

public class UniqueNameGenerator extends AnnotationBeanNameGenerator {

	@Override
	public String generateBeanName(BeanDefinition arg0,
			BeanDefinitionRegistry arg1) {
		//return super.generateBeanName(arg0, arg1);
		String shortClassName = ClassUtils.getShortName(arg0.getBeanClassName());
		String clazzName = Introspector.decapitalize(shortClassName);
		return clazzName;
	}

}
